package com.example.DataSource.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.DataSource.entity.consultant_level;
import com.example.DataSource.serviceImpl.CLServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/ljkDemo/consultant")
public class consultantController {
    @Autowired
    private CLServiceImpl clService;
    @GetMapping("/getLevel")
    public String getLevel(int levelId){
        System.out.println(levelId);
        QueryWrapper<consultant_level> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id",levelId);
        return clService.list(queryWrapper).get(0).getLevel();
    }
}
